jsElementProperties = new function()
{
	//get an objects x pos
	this.getLeft = function(obj)
	{
		//initialize to 0
		var _x = 0;
		//while the obj
		while(obj)
		{
			//increment by offset
			_x+=obj.offsetLeft;
			//set it to its parent
			obj = obj.offsetParent;
		}
		return _x;
	}
	
	this.getRight = function(obj)
	{
		return this.getLeft(obj) + obj.width;		
	}
	
	//get an objects y pos
	this.getTop = function(obj)
	{
		//initialize to 0
		var _y = 0;
		while(obj)
		{
			//increment by offset
			_y+=obj.offsetTop;
			//set it to its parent
			obj = obj.offsetParent;
		}
		return _y;
	}

	this.getBottom = function(obj)
	{
		return this.getTop(obj) + obj.height;
	}
	
	//get an objects x and y pos as an array
	this.getTopLeft = function(obj)
	{
		//initialize
		var _xy = [0,0];
		while(obj)
		{
			//increment
			_xy[0]+=obj.offsetLeft;
			_xy[1]+=obj.offsetTop;
			//set it its parent
			obj = ob.offsetParent;
		}
		return _xy;
	}
	
	this.getBounds = function(obj)
	{
		//initialize
		var _bounds = [0,0,obj.width,obj.height];
		while(obj)
		{
			//increment
			_xy[0]+=obj.offsetLeft;
			_xy[1]+=obj.offsetTop;
			//set it its parent
			obj = ob.offsetParent;
		}
		_bounds[2] += _bounds[0];
		_bounds[3] += _bounds[1];
		return _bounds;
	}
}

